{% load humanize %}
{% if page.has_other_pages %}
    {% spaceless %}
    <div class="paginator">
        Page {{ page.number }} of {{ paginator.num_pages|intcomma }}&nbsp;&nbsp;
        {% if page.has_previous %}
        <a href="{% url channel_detail_day_page channel.clean_name,date.year,date.month,date.day,page.previous_page_number %}{% if query %}?search={{ query }}{% endif %}">&larr; Previous</a>&nbsp;
        {% endif %}

        {% for p in page_range %}
        {% ifequal p "..." %}
        <strong>{{ p }}</strong>&nbsp;
        {% else %}
        <a href="{% url channel_detail_day_page channel.clean_name,date.year,date.month,date.day,p %}{% if query %}?search={{ query }}{% endif %}">{% ifequal p page.number %}<strong>{{ p }}</strong>{% else %}{{ p }}{% endifequal %}</a>&nbsp;
        {% endifequal %}
        {% endfor %}

        {% if page.has_next %}
        <a href="{% url channel_detail_day_page channel.clean_name,date.year,date.month,date.day,page.next_page_number %}{% if query %}?search={{ query }}{% endif %}">Next &rarr;</a>
        {% endif %}
        <span style="padding-left: 15px;">({{ paginator.count|intcomma }} total)</span>
    </div>
    {% endspaceless %}
{% endif %}
